<extend name="Layout/ins_base" />
<block name="content">
	<div class="Public container">
		<!-- /container -->
		<div class="row">
			<div class="col-xs-12 hidden-xs" style="margin-top:120px;"></div>
		</div>
		<div class="row">
			<div class="col-sm-8 hidden-xs">
				<div class="img"></div>
			</div>
			<div class="col-sm-4 well">
				<div style="margin-bottom:44px;margin-top:20px;">
					<h1 class="text-center">{:get_system_config("SYSTEM_NAME")}</h1>
				</div>
				<form method="post" id="form_login" class="form-horizontal">
					<div class="form-group">
						<label class="col-sm-3  control-label" for="emp_no">帐号：</label>
						<div class="col-sm-9">
							<input class="form-control" id="emp_no" name="emp_no" />
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3  control-label" for="password">密码：</label>
						<div class="col-sm-9">
							<input class="form-control" id="password" type="password" name="password" />
						</div>
					</div>
					<notempty name="is_verify_code">
						<div class="form-group">
							<label class="col-sm-3  control-label" for="verify">验证码：</label>
							<div class="col-sm-9 row">
								<div class="col-xs-6">
									<input class="form-control" id="verify" name="verify" />
								</div>
								<div class="col-xs-6">
									<img src="{:U('verify')}" / style='cursor:pointer' title='刷新验证码' id='verifyImg' onclick='freshVerify()'>
								</div>
							</div>
						</div>
					</notempty>
					<div class="form-group hidden">
						<span class="col-sm-3  control-label"> </span>
						<div class="col-sm-9">
							<label class="inline pull-left col-3">
								<input class="ace" type="checkbox" name="remember" value="1" />
								<span class="lbl"> </span> </label>
							<label for="remember-me">记住我的登录状态</label>
						</div>
					</div>
					<div class="form-group">
						<div class="col-sm-offset-3 col-sm-9">
							<input type="button" value="登录" onclick="login();" class="btn btn-sm btn-primary col-10">
						</div>
					</div>
				</form>
				<p>
					用户名：admin 密码：admin
				</p>
				<p>
					&nbsp;
				</p>
				<p>
					&nbsp;
				</p>
			</div>
		</div>
		
		<!-- 开源版不允许删除版权链接 谢谢支持  -->
		<div class="row text-right">			
			版权所有：<a href="http://www.smeoa.com">小微OA</a>
		</div>
	</div>
</block>
<block name="js">
	<script type="text/javascript">
		function login() {
			sendForm("form_login", "{:U('public/check_login')}");
		}

		$(document).ready(function() {
			var $dom = "#password";
			<notempty name="is_verify_code">$dom="#verify";</notempty >
			 $($dom).keydown(function(event) {
				if (event.keyCode == 13) {
					if (check_form("form_login")) {
						sendForm("form_login", "{:U('public/check_login')}");
						return false;
					}
				}
			});
		});
	</script>
</block>